 import {
  BaseEntity,
  Column,
  CreateDateColumn,
  Entity,
  PrimaryGeneratedColumn,
} from 'typeorm';

@Entity({ name: 't_user' })
export class User extends BaseEntity {
  //角色表
  @PrimaryGeneratedColumn()
  id: number;

  @Column({ comment: '用户名称', type: 'varchar' })
  name: string;

  @Column({ comment: '城市ID', type: 'int' })
  cityId: number;

  @Column({ comment: '性别', type: 'int' })
  sex: number;
  @Column({ comment: '手机号', type: 'varchar' })
  phone: string;
  @Column({ comment: '邮件', type: 'varchar' })
  email: string;
  @Column({ comment: '密码', type: 'varchar' })
  password: string;
  @CreateDateColumn({
    comment: '创建时间',
    type: 'datetime',
  })
  createTime: Date;
}


